package com.sunshine.ssm.mq;

import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Date;

/**
 * @Author: WeiHong
 * @Date: 2017/3/29 16:59
 */
public class InterfaceCallLog {



    private static final long serialVersionUID = 1L;

    /**
     * 标识id
     */
    private Long id;
    /**
     * 调用的接口名称
     */
    private String interfaceName;
    /**
     * 当前阶段
     */
    private String status;
    /**
     * 调用是否成功
     */
    private boolean success;

    /**
     * 合同Id
     */
    private String contractId;
    /**
     * 接口返回数据
     */
    private String returnData;
    /**
     * 接口调用时间
     */
    private Date callTime;
    /**
     * 调用异常时,错误日志
     */
    private String exceptionTrace;

    public void setInterfaceTypeEnum(InterfaceTypeEnum interfaceTypeEnum) {
        this.status = interfaceTypeEnum.getStatus();
        this.interfaceName = interfaceTypeEnum.getDesc();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getInterfaceName() {
        return interfaceName;
    }

    public void setInterfaceName(String interfaceName) {
        this.interfaceName = interfaceName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    public String getReturnData() {
        return returnData;
    }

    public void setReturnData(String returnData) {
        this.returnData = returnData;
    }

    public Date getCallTime() {
        return callTime;
    }

    public void setCallTime(Date callTime) {
        this.callTime = callTime;
    }

    public String getExceptionTrace() {
        return exceptionTrace;
    }

    public void setExceptionTrace(String exceptionTrace) {
        this.exceptionTrace = exceptionTrace;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
